import request from '@/config/axios'

export interface DrawingWorkTaskVO {
  id: number
  orderNumber: string
  orderProduceRelationId: number
  productCode: string
  dictTaskType: number
  scheduleProportion: number
  deliveryTime: localdate
  placeOrderDate: localdate
  dictOrderType: number
  customerName: string
  customerCode: string
  productName: string
  modelSpecification: string
  orderQuantity: number
  taskFormNum: string
  dictJobOrderStatus: byte
}

// 查询技术管理-图纸制作-制图派工任务单列表
export const getDrawingWorkTaskPage = async (params) => {
  return await request.get({ url: `/technology/drawing-work-task/page`, params })
}

// 查询技术管理-图纸制作-制图派工任务单详情
export const getDrawingWorkTask = async (id: number) => {
  return await request.get({ url: `/technology/drawing-work-task/getDetail?id=` + id })
}

// 新增技术管理-图纸制作-制图派工任务单
export const createDrawingWorkTask = async (data: DrawingWorkTaskVO) => {
  return await request.post({ url: `/technology/drawing-work-task/create`, data })
}

// 修改技术管理-图纸制作-制图派工任务单
export const updateDrawingWorkTask = async (data: DrawingWorkTaskVO) => {
  return await request.put({ url: `/technology/drawing-work-task/update`, data })
}

// 删除技术管理-图纸制作-制图派工任务单
export const deleteDrawingWorkTask = async (id: number) => {
  return await request.delete({ url: `/technology/drawing-work-task/delete?id=` + id })
}

// 导出技术管理-图纸制作-制图派工任务单 Excel
export const exportDrawingWorkTask = async (data) => {
  return await request.download({ url: `/technology/drawing-work-task/export-excel`, data })
}
